home *** CD-ROM | disk | FTP | other *** search
-
-
-
- shmctl C Library Procedures shmctl
-
-
-
- NNAAMMEE
- shmctl - shared memory control operations
-
- SSYYNNTTAAXX
- ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
- ##iinncclluuddee <<ssyyss//iippcc..hh>>
- ##iinncclluuddee <<ssyyss//sshhmm..hh>>
-
- iinntt sshhmmccttll ((sshhmmiidd,, ccmmdd,, bbuuff))
- iinntt sshhmmiidd,, ccmmdd;;
- ssttrruucctt sshhmmiidd__ddss **bbuuff;;
-
- DDEESSCCRRIIPPTTIIOONN
- The system call provides a variety of shared memory control
- operations as specified by _c_m_d. The following _c_m_d_s are
- available:
-
- IIPPCC__SSTTAATT Place the current value of each member of the
- data structure associated with _s_h_m_i_d into the
- structure pointed to by _b_u_f. The contents of
- this structure are defined in
-
- IIPPCC__SSEETT Set the value of the following members of the
- data structure associated with _s_h_m_i_d to the
- corresponding value found in the structure
- pointed to by _b_u_f: shm_perm.uid shm_perm.gid
- shm_perm.mode /* only low 9 bits */
-
- This _c_m_d can only be executed by a process that has
- an effective user ID equal to either that of super
- user or to the value of sshhmm__ppeerrmm..uuiidd in the data
- structure associated with _s_h_m_i_d.
-
- IIPPCC__RRMMIIDD Remove the shared memory identifier specified
- by _s_h_m_i_d from the system and destroy the
- shared memory segment and data structure
- associated with it. This _c_m_d can only be exe-
- cuted by a process that has an effective user
- ID equal to either that of super user or to
- the value of sshhmm__ppeerrmm..uuiidd in the data struc-
- ture associated with _s_h_m_i_d.
-
- SSHHMM__LLOOCCKK Lock the shared memory segment specified by
- _s_h_m_i_d in memory. This _c_m_d can only be exe-
- cuted by a process that has an effective usr
- ID equal to super user.
-
- SSHHMM__UUNNLLOOCCKK Unlock the shared memory segment specified by
- _s_h_m_i_d. This _c_m_d can only be executed by a
- process that has an effective usr ID equal to
- super user.
-
-
-
-
- Sprite v1.0 1
-
-
-
-
-
-
- shmctl C Library Procedures shmctl
-
-
-
- RREETTUURRNN VVAALLUUEE
- Upon successful completion, a value of 0 is returned. Oth-
- erwise, a value of -1 is returned and _e_r_r_n_o is set to indi-
- cated the error.
-
- DDIIAAGGNNOOSSTTIICCSS
- The system call will fail if one or more of the following
- are true:
-
- [EINVAL] The _s_h_m_i_d is not a valid shared memory iden-
- tifier.
-
- [EINVAL] The _c_m_d is not a valid command.
-
- [EACCES] The _c_m_d is equal to IPC_STAT and read permis-
- sion is denied to the calling process. For
- further information, see
-
- [EPERM] The _c_m_d is equal to IPC_RMID or IPC_SET and
- the effective user ID of the calling process
- is not equal to that of super user and it is
- not equal to the value of sshhmm__ppeerrmm..uuiidd in the
- data structure associated with _s_h_m_i_d.
-
- [EPERM] The _c_m_d is equal to SHM_LOCK or SHM_UNLOCK
- and the effective user ID of the calling pro-
- cess is not equal to that of superuser.
-
- [EINVAL] The _c_m_d is equal to SHM_LOCK and the shared
- memory segment is currently locked by this
- process.
-
- [EINVAL] The _c_m_d is equal to SHM_UNLOCK and the shared
- memory segment specified by _s_h_m_i_d is not
- currently locked in memory by this process.
-
- [EFAULT] The _b_u_f points to an illegal address.
-
- SSEEEE AALLSSOO
- shmget(2), shmop(2)
-
- BBUUGGSS
- The System V shared memory functions are implemented at user
- level on top of the mmap(2) interface. Not all the System V
- functionality is implemented.
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 2
-
-
-
-